﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using ITAP.ContourBuilder.Components;
using ITAP.ContourBuilder.Components.Dimensions;

namespace ITAP.ContourBuilder.Manipulation
{
    public class ActionSelectMoveChangeDelete : ContourAction
    {
        public ActionSelectMoveChangeDelete(string name)
            : base(name)
        {
        }

        public override Bitmap Icon
        {
            get
            {
                return null;// return Resources.MoveSelect.ToBitmap();
            }
        }

        public override void Execute()
        {
            commandsToExecute.Add(new CommandNavigation(this.control));
            commandsToExecute.Add(new CommandSelectComponents(this.control, new Type[] { typeof(ContourElementHook), typeof(ContourElement), typeof(ContourConnector), typeof(ContourHole), typeof(ContourText), typeof(ContourCommentLine) }));
            commandsToExecute.Add(new CommandMoveComponents(this.control, new Type[] { typeof(ContourElement), typeof(ContourConnector), typeof(ContourHole), typeof(ContourText) }));
            commandsToExecute.Add(new CommandChangeComponentProperties(this.control));
            commandsToExecute.Add(new CommandRemoveComponents(this.control));
            base.Execute();
        }

        public override bool AllowMultipleInstances
        {
            get
            {
                return false;
            }
        }
    }
}
